package edu.ptu.communityplatform.config;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;

import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;


/**
 * @BelongsProject: communityPlatform
 * @BelongsPackage: edu.ptu.community platform.config
 * @Author: HYJ
 * @CreateTime: 2025-04-04  17:38
 * @Description: TODO
 * @Version: 1.0
 */
public class MPConfig {

    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();

        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));

        return interceptor;
    }
}
